package com.twb.fileCenter.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import com.twb.fileCenter.constants.FileCenterConstants;

/** 
 * @ClassName FileCenterProperties 
 * @Description 文件服务器，配置属性
 * @author DSY
 * @date 2018年12月17日 上午11:26:50 
 */ 
@Component
@ConfigurationProperties(prefix = "twb.file-center")
public class FileCenterProperties {
	
	/**
	 *  文件服务器类型（local ftp sftp）
	 */
	private String serverType = FileCenterConstants.serverType.LOCAL;
	
	/**
	 * 是否上传到数据库
	 */
	private boolean uploadToDb = true;
	/**
	 * 是否生成缩略图
	 */
	private boolean thumbnail = true;
	
	/**
	 *缩略图宽度
	 */
	private int thumbnailWidth = 200;
	
	/**
	 *缩略图高度
	 */
	private int thumbnailHeight = 200;
	/**
	 * 文件上传父级文件夹
	 */
	private String uploadPath = "/TwUploadFile";
	
	/**
	 * 文件上传物理路径
	 */
	private String fileServerPath = "";
	
	/**
	 * 工作流流程图存储路径
	 */
	private String activitiFilePath = "/activitiFile";
	
	/**
	 * 文件发布地址
	 */
	private String fileServerUrl = "";

	public String getServerType() {
		return serverType;
	}

	public void setServerType(String serverType) {
		this.serverType = serverType;
	}

	public boolean isUploadToDb() {
		return uploadToDb;
	}

	public void setUploadToDb(boolean uploadToDb) {
		this.uploadToDb = uploadToDb;
	}

	public boolean isThumbnail() {
		return thumbnail;
	}

	public void setThumbnail(boolean thumbnail) {
		this.thumbnail = thumbnail;
	}

	public int getThumbnailWidth() {
		return thumbnailWidth;
	}

	public void setThumbnailWidth(int thumbnailWidth) {
		this.thumbnailWidth = thumbnailWidth;
	}

	public int getThumbnailHeight() {
		return thumbnailHeight;
	}

	public void setThumbnailHeight(int thumbnailHeight) {
		this.thumbnailHeight = thumbnailHeight;
	}

	public String getUploadPath() {
		return uploadPath;
	}

	public void setUploadPath(String uploadPath) {
		this.uploadPath = uploadPath;
	}

	public String getFileServerPath() {
		return fileServerPath;
	}

	public void setFileServerPath(String fileServerPath) {
		this.fileServerPath = fileServerPath;
	}

	public String getActivitiFilePath() {
		return activitiFilePath;
	}

	public void setActivitiFilePath(String activitiFilePath) {
		this.activitiFilePath = activitiFilePath;
	}

	public String getFileServerUrl() {
		return fileServerUrl;
	}

	public void setFileServerUrl(String fileServerUrl) {
		this.fileServerUrl = fileServerUrl;
	}
}
